package com.xcw.controller;

import com.xcw.base.constant.Const;
import com.xcw.base.dto.UserDto;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author bhx
 * @Date 2022/8/28 23:38
 * @Description TODO
 */
@Controller
public class IndexController extends BaseController{

    @RequestMapping(value = {"","/"})
    public String index(){
        UserDto userDto = (UserDto) request.getSession().getAttribute(Const.CURRENT_USER);
        request.setAttribute("username", userDto.getUsername());
        return "index";
    }
}
